<!DOCTYPE html>
<html>
<body>
<h2>The XMLHttpRequest LOGIN</h2>
<button type="button" onclick="onLoginClicked()">Login</button><br>
<textarea id="demo" rows="20" cols="100"></textarea>
<script>

function onLoginClicked(){
    var data = {account:"admin", password:"123qwe"};
    var http = new XMLHttpRequest();
    http.onload = function(){
        document.getElementById("demo").value = this.responseText;
        var json = JSON.parse(this.responseText);
        console.log(json);
    }
    http.open("POST", "http://wx.taoke93.com:8100/api/auth/login", true)
    http.send(JSON.stringify(data));
}

</script>

</body>
</html>
